package com.hckjsec.cloud.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hckjsec.cloud.mapper.AppletsPublicNewsMapper;
import com.hckjsec.cloud.domain.AppletsPublicNews;
import com.hckjsec.cloud.service.IAppletsPublicNewsService;

/**
 * 新闻动态Service业务层处理
 * 
 * @author cyt
 * @date 2021-09-04
 */
@Service
public class AppletsPublicNewsServiceImpl implements IAppletsPublicNewsService 
{
    @Autowired
    private AppletsPublicNewsMapper appletsPublicNewsMapper;

    /**
     * 查询新闻动态
     * 
     * @param newsId 新闻动态ID
     * @return 新闻动态
     */
    @Override
    public AppletsPublicNews selectAppletsPublicNewsById(Long newsId)
    {
        return appletsPublicNewsMapper.selectAppletsPublicNewsById(newsId);
    }

    /**
     * 查询新闻动态列表
     * 
     * @param appletsPublicNews 新闻动态
     * @return 新闻动态
     */
    @Override
    public List<AppletsPublicNews> selectAppletsPublicNewsList(AppletsPublicNews appletsPublicNews)
    {
        return appletsPublicNewsMapper.selectAppletsPublicNewsList(appletsPublicNews);
    }

    /**
     * 新增新闻动态
     * 
     * @param appletsPublicNews 新闻动态
     * @return 结果
     */
    @Override
    public int insertAppletsPublicNews(AppletsPublicNews appletsPublicNews)
    {
        return appletsPublicNewsMapper.insertAppletsPublicNews(appletsPublicNews);
    }

    /**
     * 修改新闻动态
     * 
     * @param appletsPublicNews 新闻动态
     * @return 结果
     */
    @Override
    public int updateAppletsPublicNews(AppletsPublicNews appletsPublicNews)
    {
        return appletsPublicNewsMapper.updateAppletsPublicNews(appletsPublicNews);
    }

    /**
     * 批量删除新闻动态
     * 
     * @param newsIds 需要删除的新闻动态ID
     * @return 结果
     */
    @Override
    public int deleteAppletsPublicNewsByIds(Long[] newsIds)
    {
        return appletsPublicNewsMapper.deleteAppletsPublicNewsByIds(newsIds);
    }

    /**
     * 删除新闻动态信息
     * 
     * @param newsId 新闻动态ID
     * @return 结果
     */
    @Override
    public int deleteAppletsPublicNewsById(Long newsId)
    {
        return appletsPublicNewsMapper.deleteAppletsPublicNewsById(newsId);
    }
}
